home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 14315 / 14315.xpi / content / tab.xml < prev   
Extensible Markup Language  |  2009-09-14  |  6KB  |  167 lines

  1. ∩╗┐<?xml version="1.0"?>
  2. <!--
  3.  ***** BEGIN LICENSE BLOCK *****
  4.    - Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.    -
  6.    - The contents of this file are subject to the Mozilla Public License Version
  7.    - 1.1 (the "License"); you may not use this file except in compliance with
  8.    - the License. You may obtain a copy of the License at
  9.    - http://www.mozilla.org/MPL/
  10.    -
  11.    - Software distributed under the License is distributed on an "AS IS" basis,
  12.    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.    - for the specific language governing rights and limitations under the
  14.    - License.
  15.    -
  16.    - The Original Code is in file tabbrowser.xml, which was released on March 28, 2001.
  17.    - This File copy a part of original code with modification.
  18.    -
  19.    - The Initial Developer of the Original Code is
  20.    - David Hyatt.
  21.    - Portions created by the Initial Developer are Copyright (C) 2001
  22.    - the Initial Developer. All Rights Reserved.
  23.    -
  24.    - Contributor(s):
  25.    -   David Hyatt <hyatt@netscape.com> (Original Author of <tabbrowser>)
  26.    -   Mike Connor <mconnor@steelgryphon.com>
  27.    -   Peter Parente <parente@cs.unc.edu>
  28.    -   Giorgio Maone <g.maone@informaction.com>
  29.    -   Asaf Romano <mozilla.mano@sent.com>
  30.    -   Seth Spitzer <sspitzer@mozilla.org>
  31.    -   Simon B├╝nzli <zeniko@gmail.com>
  32.    -   Michael Ventnor <ventnor.bugzilla@yahoo.com.au>
  33.    -   Mark Pilgrim <pilgrim@gmail.com>
  34.    -   Kwan Kai Chung <ZeodoHokil@gmail.com>
  35.    -
  36.    - Alternatively, the contents of this file may be used under the terms of
  37.    - either the GNU General Public License Version 2 or later (the "GPL"), or
  38.    - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  39.    - in which case the provisions of the GPL or the LGPL are applicable instead
  40.    - of those above. If you wish to allow use of your version of this file only
  41.    - under the terms of either the GPL or the LGPL, and not to allow others to
  42.    - use your version of this file under the terms of the MPL, indicate your
  43.    - decision by deleting the provisions above and replace them with the notice
  44.    - and other provisions required by the GPL or the LGPL. If you do not delete
  45.    - the provisions above, a recipient may use your version of this file under
  46.    - the terms of any one of the MPL, the GPL or the LGPL.
  47.    -
  48.    - ***** END LICENSE BLOCK ***** 
  49. -->
  50.  
  51. <!-- 
  52.     the following code also referenced to Chromin Frame, 
  53.     developed by Zero Fire, please see
  54.     https://addons.mozilla.org/en-US/firefox/addon/10091  
  55. -->
  56.  
  57.  
  58.  
  59. <!DOCTYPE bindings [
  60. <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
  61. %browserDTD;
  62. <!ENTITY % tabBrowserDTD SYSTEM "chrome://browser/locale/tabbrowser.dtd" >
  63. %tabBrowserDTD;
  64. <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
  65. %brandDTD;
  66. <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
  67. %globalDTD;
  68. ]>
  69.  
  70.  
  71. <bindings id="CFTabBindings"
  72.           xmlns="http://www.mozilla.org/xbl"
  73.           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  74.           xmlns:xbl="http://www.mozilla.org/xbl">
  75.  
  76.     <!--
  77.         The following blinding (id tabbrowser-tabs) is copy from tabbrowser.xml,
  78.         with modification (onbdlclick callback of tabs-stack changed)  
  79.      -->  
  80.     <binding id="tabbrowser-tabs" extends="chrome://browser/content/tabbrowser.xml#tabbrowser-tabs">
  81.         <content>
  82.             <!-- modification exist in next line -->
  83.             <xul:stack flex="1" class="tabs-stack" ondblclick="this.parentNode.tryDlbClickCallback(event);">
  84.         
  85.                 <xul:vbox>
  86.                     <xul:spacer flex="1"/>
  87.                     <xul:hbox class="tabs-bottom" align="center"/>
  88.                 </xul:vbox>
  89.                 <xul:hbox xbl:inherits="overflow" class="tabs-container">
  90.                 <xul:arrowscrollbox anonid="arrowscrollbox" orient="horizontal" flex="1"
  91.                                     style="min-width: 1px;" chromedir="&locale.dir;"
  92.                                     clicktoscroll="true"
  93.                                     class="tabbrowser-arrowscrollbox"
  94.                                     >
  95.                     <children includes="tab"/>
  96.                     <children/>
  97.                     <xul:toolbarbutton class="tabs-newtab-button"
  98.                                     command="cmd_newNavigatorTab" chromedir="&locale.dir;"
  99.                                     tooltiptext="&newTabButton.tooltip;"/>
  100.                 </xul:arrowscrollbox>
  101.                 <xul:toolbarbutton class="tabs-newtab-button" anonid="newtab-button"
  102.                                     command="cmd_newNavigatorTab" chromedir="&locale.dir;"
  103.                                     tooltiptext="&newTabButton.tooltip;"/>
  104.                 <xul:stack align="center" pack="end" chromedir="&locale.dir;">
  105.                     <xul:hbox flex="1" class="tabs-alltabs-box" anonid="alltabs-box"/>
  106.                     <xul:hbox flex="1" class="tabs-alltabs-box-animate" anonid="alltabs-box-animate"/>
  107.                     <xul:toolbarbutton class="tabs-alltabs-button" type="menu" anonid="alltabs-button"
  108.                                     tooltiptext="&listAllTabs.label;">
  109.                     <xul:menupopup class="tabs-alltabs-popup" anonid="alltabs-popup"
  110.                                     position="after_end"/>
  111.                     </xul:toolbarbutton>
  112.                 </xul:stack>
  113.                 <xul:toolbarbutton anonid="tabs-closebutton"
  114.                                     class="close-button tabs-closebutton" chromedir="&locale.dir;"/>
  115.                 </xul:hbox>
  116.             </xul:stack> 
  117.         </content>
  118.         
  119.         <implementation>
  120.             <method name="tryDlbClickCallback">
  121.                 <parameter name="aEvent"/>
  122.                 <body>
  123.                 <![CDATA[
  124.                     if(window.windowState==1)
  125.                     {
  126.                     
  127.                         window.restore();
  128.                     }
  129.                     else
  130.                     {
  131.                         window.maximize();
  132.                     }
  133.                     aEvent.stopPropagation();
  134.           aEvent.preventDefault();
  135.                 ]]>
  136.                 </body>
  137.             </method>
  138.         </implementation>
  139.     </binding>
  140.     <!-- 
  141.         the following code with id referenced to Chromin Frame, 
  142.         developed by Zero Fire 
  143.     -->
  144.     <binding id="tab-dbclick-box">
  145.         <content>
  146.               <xul:stack flex="1">
  147.               <xul:hbox flex="1" ondblclick="tryDlbClickCallback(event);"/>
  148.               <xul:titlebar flex="1" class="frame-titlebar" ondblclick="tryDlbClickCallback(event);"/>
  149.               </xul:stack>
  150.         </content>
  151.         <implementation>
  152.             <method name="tryDlbClickCallback">
  153.                 <parameter name="aEvent"/>
  154.                 <body>
  155.                 <![CDATA[
  156.                     gChrominFrame.Maximize();
  157.           aEvent.stopPropagation();
  158.                 ]]>
  159.                 </body>
  160.             </method>
  161.         </implementation>
  162.         <handlers>
  163.             <handler event="dblclick" button="0" action="tryDlbClickCallback(event)"/>
  164.         </handlers>
  165.     </binding>
  166.  
  167. </bindings>